var e = require("../../@babel/runtime/helpers/interopRequireDefault"), r = e(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/asyncToGenerator"), a = new (e(require("../../http/offlineShop")).default)();

Page({
    data: {
        orderId: ""
    },
    onLoad: function(e) {
        this.setData({
            orderId: e.orderId
        }), this.getDetail();
    },
    getDetail: function() {
        var e = this;
        return t(r.default.mark(function t() {
            var n, d;
            return r.default.wrap(function(r) {
                for (;;) switch (r.prev = r.next) {
                  case 0:
                    return r.prev = 0, wx.showLoading({
                        title: "加载中"
                    }), n = {
                        orderId: e.data.orderId
                    }, r.next = 5, a.checkOfflineShopOrder(n);

                  case 5:
                    d = r.sent, 0 == d.data.orderStatus ? wx.redirectTo({
                        url: "/pages/shop_order/shop_order?orderId=".concat(e.data.orderId)
                    }) : wx.reLaunch({
                        url: "/pages/index/index"
                    }), r.next = 12;
                    break;

                  case 10:
                    r.prev = 10, r.t0 = r.catch(0);

                  case 12:
                    return r.prev = 12, wx.hideLoading(), r.finish(12);

                  case 15:
                  case "end":
                    return r.stop();
                }
            }, t, null, [ [ 0, 10, 12, 15 ] ]);
        }))();
    }
});